Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finalize ML-DSA asn.1 module #2117

Merged
merged 1 commit into from
Jan 16, 2025
Merged

Finalize ML-DSA asn.1 module #2117

merged 1 commit into from
Jan 16, 2025

Conversation

jakemas
Copy link
Contributor

@jakemas jakemas commented Jan 14, 2025

Issues:

Aligned with https://datatracker.ietf.org/doc/draft-ietf-lamps-dilithium-certificates/06/ on ML-DSA ASN.1 encoding and decoding.

Description of changes:

Will and I checked through the ASN.1 encoding and decoding functions to check compatibility with the draft RFC. We have confirmed that we are in alignment with the standard, so can remove this TODO.

Call-outs:

For reference, the padding bit 0 used in !CBB_add_u8(&key_bitstring, 0 /* padding */) || is present because DER-encoded bit strings use the first "value" byte to give the number of (least significant) 0-padding bits at the end of byte sequence. As the padding is 0 for ML-DSA keys, we encode this value at the start of the bitstring.

For private keys, OCTET STRING encoding is used.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@jakemas jakemas requested a review from a team as a code owner January 14, 2025 20:11
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.93%. Comparing base (e76db6c) to head (c75fb26).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2117      +/-   ##
==========================================
+ Coverage   78.92%   78.93%   +0.01%     
==========================================
  Files         610      610              
  Lines      105121   105121              
  Branches    14904    14903       -1     
==========================================
+ Hits        82967    82978      +11     
+ Misses      21503    21491      -12     
- Partials      651      652       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andrewhop andrewhop changed the title Finalize asn.1 module Finalize ML-DSA asn.1 module Jan 14, 2025
@justsmth justsmth merged commit ed5764b into aws:main Jan 16, 2025
124 of 126 checks passed
manastasova pushed a commit to manastasova/aws-lc that referenced this pull request Jan 30, 2025
### Issues:
Aligned with
https://datatracker.ietf.org/doc/draft-ietf-lamps-dilithium-certificates/06/
on ML-DSA ASN.1 encoding and decoding.

### Description of changes: 
Will and I checked through the ASN.1 encoding and decoding functions to
check compatibility with the draft RFC. We have confirmed that we are in
alignment with the standard, so can remove this TODO.

### Call-outs:
For reference, the padding bit `0` used in `!CBB_add_u8(&key_bitstring,
0 /* padding */) ||` is present because DER-encoded bit strings use the
first "value" byte to give the number of (least significant) 0-padding
bits at the end of byte sequence. As the padding is 0 for ML-DSA keys,
we encode this value at the start of the bitstring.

For private keys, OCTET STRING encoding is used.

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and the ISC license.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants